﻿using System;
using Utils;

namespace TrixPlugin.Common
{
	[Serializable]
	internal class StrategyControlData : Plugins.Base.Common.StrategyControlDataBase, ICloneable<StrategyControlData>
	{
		#region Attributes

		private int _trixPeriod;
		private int _barPeriod;
		private int _volume;
		private decimal _stopLoss;

		#endregion

		#region Properties

		public int TrixPeriod
		{
			get
			{
				return _trixPeriod;
			}
			set
			{
				if (_trixPeriod != value)
				{
					_trixPeriod = value;
					base.OnPropertyChanged("TrixPeriod");
				}
			}
		}

		public int BarPeriod
		{
			get
			{
				return _barPeriod;
			}
			set
			{
				if (_barPeriod != value)
				{
					_barPeriod = value;
					base.OnPropertyChanged("BarPeriod");
				}
			}
		}

		public int Volume
		{
			get
			{
				return _volume;
			}
			set
			{
				if (_volume != value)
				{
					_volume = value;
					base.OnPropertyChanged("Volume");
				}
			}
		}

		public decimal StopLoss
		{
			get
			{
				return _stopLoss;
			}
			set
			{
				if (_stopLoss != value)
				{
					_stopLoss = value;
					base.OnPropertyChanged("StopLoss");
				}
			}
		}

		#endregion

		#region ICopiable

		public StrategyControlData Clone()
		{
			return (StrategyControlData)this.MemberwiseClone();
		}

		public void Copy(StrategyControlData source)
		{
			base.Copy(source);
		}

		#endregion
	}
}
